package com.gupao.study.observer;

import com.google.common.eventbus.Subscribe;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * 老师-事件观察者
 */
@Data
@AllArgsConstructor
public class Teacher {

    private String name;

    @Subscribe
    public void quiz(Student student){
        System.out.println(getName()+"老师，您有一个学生，"+student.getName()+"提出问题："+student.getProblem()+" 请及时答疑");
    }


}
